package com.yanqu.road.entity.zhaoshang;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.player.UserBaseInfo;

import java.util.Objects;

/**
 * 榜首
 */
public class ZsTopOfRank extends DataObject {

    private int bigRankType;

    private int weekId;        //每周一（20201109)

    private int rankType;      //类型

    private long userId;       //玩家

    private long lastUpdateTime;

    private long value;

    private String param = "";

    private UserBaseInfo userBaseInfo;   //玩家详情

    public int getBigRankType() {
        return bigRankType;
    }

    public void setBigRankType(int bigRankType) {
        if(this.bigRankType != bigRankType) {
            this.bigRankType = bigRankType;
            setUpdateOption();
        }
    }

    public int getWeekId() {
        return weekId;
    }

    public void setWeekId(int weekId) {
        if(this.weekId != weekId) {
            this.weekId = weekId;
            setUpdateOption();
        }
    }

    public int getRankType() {
        return rankType;
    }

    public void setRankType(int rankType) {
        if(this.rankType != rankType) {
            this.rankType = rankType;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        if(this.lastUpdateTime != lastUpdateTime) {
            this.lastUpdateTime = lastUpdateTime;
            setUpdateOption();
        }
    }

    public long getValue() {
        return value;
    }

    public void setValue(long value) {
        if(this.value != value) {
            this.value = value;
            setUpdateOption();
        }
    }

    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        if(!Objects.equals(this.param, param)) {
            this.param = param;
            setUpdateOption();
        }
    }

    public UserBaseInfo getUserBaseInfo() {
        return userBaseInfo;
    }

    public void setUserBaseInfo(UserBaseInfo userBaseInfo) {
        this.userBaseInfo = userBaseInfo;
        setUpdateOption();
    }

    public String getUserBaseInfoJsonStr(){
        if(null == userBaseInfo){
            return "{}";
        }else {
            return JSON.toJSONString(userBaseInfo);
        }
    }

}
